//
//  BonusSprite.h
//  airfight
//
//  Created by aaron on 12-11-22.
//  Copyright (c) 2012年 moonriver. All rights reserved.
//

#ifndef airfight_BonusSprite_h
#define airfight_BonusSprite_h

#include "EntitySprite.h"

enum bonus_toDestoryFlag
{
    BONUS_DESTROY_OUT = 1,
    BONUS_DESTROY_COLLECT = 2
    
};


enum BONUS_MOVETYPE
{

    STRAIGHTDOWN = 1,
    SIDECOLLIDE
};

class BonusSprite : public EntitySprite
{
    CC_SYNTHESIZE(int,m_pID,ID);
    //CC_SYNTHESIZE(int,m_pRollingSpeed,m_pRollingSpeed);
    CC_SYNTHESIZE(int,m_pType,Type);
       
private:
    CCSpriteBatchNode *batch;
    CCSize screenSize;
    float m_fSpeedX;
    float m_fSpeedY;
    float m_pRollingSpeed;
    int m_iCollisionCount;
    
public:
    BonusSprite();
    virtual ~BonusSprite();
    
    bool init();
    void onEnter();
    void update(float dt);
    
    void handleContact(ENTITY_TYPE type, CCDictionary *effect);
    void setRollingSpeed(int rollingSpeed);
};

#endif
